package Lirmm.DataStructure;

import java.util.ArrayList;
import java.util.List;

public class Clazz 
{
	private String className;
	private List<Method> Methods ;
	private List<Attribute> Attributes ;
	private String SuperClassName;
	
	public Clazz()
	{
		this.className="";
		Methods = new ArrayList<Method>();
		Attributes = new ArrayList<Attribute>();
		this.SuperClassName="";
	}
	
	public void setClassName(String nameClass)
	{
		this.className=nameClass;
	}
	
	public String getClassName()
	{
		return this.className;
	}
	
	public List<Method> getMethods()
	{
		return this.Methods;
	}
	
	public List<Attribute> getAttributes()
	{
		return this.Attributes;
	}
	
	public void setAttribute(Attribute AttrName)
	{
		this.Attributes.add(AttrName);
	}

	public void setAttributeList(List<Attribute> AttrNameList)
	{
		this.Attributes=AttrNameList;
	}
	
	public List<Attribute> getAttributeList( )
	{
		return this.Attributes;
	}
	
	public void setMethodList(List<Method> MethodNameList)
	{
		this.Methods=MethodNameList;
	}
	
	public List<Method> setMethodList( )
	{
		return this.Methods;
	}
	public void setSuperClassName(String Sname)
	{
		this.SuperClassName=Sname;
	}
	
	public String getSuperClassName()
	{
		return this.SuperClassName;
	}
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((className == null) ? 0 : className.hashCode());
		return result;
	}
	
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Clazz other = (Clazz) obj;
		if (className == null) {
			if (other.className != null)
				return false;
		} else if (!className.equals(other.className))
			return false;
		return true;
	}
}
